/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package paket;

import java.util.ArrayList;

/**
 *
 * @author KEYSAN
 */
public class listeDuzenle {
    public static ArrayList duzenle(ArrayList liste){
        ArrayList templist=new ArrayList();
        int sayac=0;
        for(int i = 0; i < liste.size(); i++){
            if(templist!=null){
                for(int k = 0; k < templist.size(); k++){
                    if(liste.get(i)==templist.get(k)){
                        sayac=sayac+1;
                    }
                }
                if(sayac==0){
                    templist.add(liste.get(i));
                }
            }
            else{
                templist.add(liste.get(i));
            }
            sayac=0;
        }
        System.out.println("liste : "+liste);
        System.out.println("templiste : "+templist);
        return templist;
    }
    public static void yazdir(ArrayList liste){
        System.out.println(" ben yazdırrrr ");
        for(int i=0;i<liste.size();i++){
            System.out.println(i+"************");
            Hero.Yazdir((Hero[][]) liste.get(i));
            System.out.println(i+"+++++++++++++");
        }
    }
}
